import { setData, getData } from "@/utils/storage.js";
import { defineStore } from "pinia";

let useTipStore = defineStore("TipStore", {
  state: () => {
    return {
      tipChecker: getData("tipChecker") || {},
    };
  },
  actions: {
    tipCheckerSwitch(key, value) {
      this.tipChecker[key] = value;
      setData("tipChecker", this.tipChecker);
    },
  },
});

export default useTipStore;
